<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 1000px;
        }

        .box {
            width: 200px;
            height: 200px;
            /* background-color: red; */
            position: relative;
            left: 50%;
            margin: 100px 0 0 -100px;
            transition: all 3s;
            /* 过渡动画 */
            transform-style: preserve-3d;
            /* 给容器添3d特效，表示子元素3d空间呈现 */
        }

        .box div {
            width: 200px;
            height: 200px;
            position: absolute;
            opacity: .5;
        }

        .box:hover {
            transform: rotateY(360deg);
        }

        .box div:nth-child(1) {
            background-color: pink;
            transform: rotateY(60deg) translateZ(200px);
        }

        .box div:nth-child(2) {
            background-color: green;
            transform: rotateY(120deg) translateZ(200px);
        }

        .box div:nth-child(3) {
            background-color: blue;
            transform: rotateY(180deg) translateZ(200px);
        }

        .box div:nth-child(4) {
            background-color: skyblue;
            transform: rotateY(240deg) translateZ(200px);
        }

        .box div:nth-child(5) {
            background-color: red;
            transform: rotateY(300deg) translateZ(200px);
        }

        .box div:nth-child(6) {
            background-color: yellow;
            transform: rotateY(360deg) translateZ(200px);
        }
    </style>
</head>

<body>
    <div class="box">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>

</html>